<?php
require_once('../includes/DB.class.php');
require_once('../includes/SmartyManager.class.php');
require_once('../includes/Filter.class.php');
require_once('../includes/functions.inc.php');
require_once('../includes/SpecialFileStateAccountant.class.php');

	$filename = $_GET['filename'];

	$account = new SpecialFileStateAccountant($filename);
	$account->execute();
	$data = array(
				'产品质量证明书号' 	=> 	$account->getCertificationNumber(),
				'发车证书号'	=>  $account->getFacheNumber(),
				'产品质量证明书编号' 		=> 	$account->getCertificationCodification(),
				'批次' 		=> 	$account->getSequenceNumber(),
				'生产厂家' 		=> 	$account->getManufactory(),
				'船级' 		=> 	$account->getAuthenticationMark(),
				'材质' 		=> 	$account->getSteelNumber(),
				'厚' 		=> 	$account->getSize1(),
				'宽' 		=> 	$account->getSize2(),
				'长' 		=> 	$account->getSize3(),
				'数量'	=>	$account->getCount(),
				'单重'		=>	$account->getUnitWeight(),
				'重量'	=>	$account->getWeight(),
				'订单号'		=>	$account->getOrderNumber(),
				'订单子项号'		=>	$account->getOrderSubitemNumber(),
				'受订单价'		=>	$account->getUnitPrice(),
				'物料号'		=>  $account->getMaterialNumber(),
				'发货批次'	=>  $account->getConsignmentBatch(),
				'批号'		=>  $account->getSampleBatch(),
				'购单号'	=>  $account->getPurchaseNumber(),
				'发货时间'	=>  $account->getShipmentDate(),
				'合同月份'	=>  $account->getMonth(),
				'车号'	=>  $account->getVehicleNumber(),
				'销售产家'	=>  $account->getConsignee(),
				'备注'	=>  $account->getRemark(),
				'状态'		=> $account->getStat()
		);
		
	$filename = pathinfo($filename, PATHINFO_FILENAME).'物流状况-'.date('YmdHis').'.xls';
	generateHttpExcelByCols($data,$filename);
?>